<?php
if (isset($poster)) {
  echo '<pre>';
  print_r($poster);
  echo '</pre>';
}
?>

<form method="post" action="<?=$html->url('/deliveries/add');?>">
<fieldset>
<legend>New Delivery</legend>

<div class="input select"><label for="Delivery.edit_open">Editing Starts for Producers:</label><?php echo $form->month("Delivery.edit_open") . ' ' . $form->day("Delivery.edit_open") . ', ' . $form->year("Delivery.edit_open", null, date('Y'), date('Y') + 1);?></div>

<div class="input select"><label for="Delivery.order_open">Editing Ends &amp; Ordering Start Date:</label><?php echo $form->month("Delivery.order_open") . ' ' . $form->day("Delivery.order_open") . ', ' . $form->year("Delivery.order_open", null, date('Y'), date('Y') + 1);?></div>

<div class="input select"><label for="Delivery.order_closed">Closing Date:</label><?php echo $form->month("Delivery.order_closed") . ' ' . $form->day("Delivery.order_closed") . ', ' . $form->year("Delivery.order_closed", null, date('Y'), date('Y') + 1);?></div>

<div class="input select"><label for="Delivery.delivery_open">Delivery Date &amp; Time:</label><?php echo $form->month("Delivery.delivery_open") . ' ' . $form->day("Delivery.delivery_open") . ', ' . $form->year("Delivery.delivery_open", null, date('Y'), date('Y') + 1) . " at " . $form->hour("Delivery.delivery_open") . ":" . $form->minute("Delivery.delivery_open", null, array('interval' => 5)) . " " . $form->meridian("Delivery.delivery_open");?></div>

<div class="input select"><label for="Delivery.delivery_closed">Delivery Close Time:</label><?php echo $form->hour("Delivery.delivery_closed") . ":" . $form->minute("Delivery.delivery_closed", null, array('interval' => 5)) . " " . $form->meridian("Delivery.delivery_closed")?></div>

<div class="input select"><label for="Delivery.pickup_open">Pickup Date &amp; Time:</label><?php echo $form->month("Delivery.pickup_open") . ' ' . $form->day("Delivery.pickup_open") . ', ' . $form->year("Delivery.pickup_open", null, date('Y'), date('Y') + 1) . " at " . $form->hour("Delivery.pickup_open") . ":" . $form->minute("Delivery.pickup_open", null, array('interval' => 5)) . " " . $form->meridian("Delivery.pickup_open");?></div>

<div class="input select"><label for="Delivery.pickup_closed">Pickup Close Time:</label><?php echo $form->hour("Delivery.pickup_closed") . ":" . $form->minute("Delivery.pickup_closed", null, array('interval' => 5)) . " " . $form->meridian("Delivery.pickup_closed")?></div>

<?=$form->input("Delivery.msg_all",array("rows"=>5,"cols"=>35, 'label' => 'Thank You Email body'));?>
<?=$form->input("Delivery.msg_bottom",array("rows"=>5,"cols"=>35, 'label' => 'Thank You Email signature'));?>

</fieldset>
<?=$form->submit();?>
</form>
